//---------------------------------------------------------------
//Game Status Mut
//By Dr.Terv & IronBee
//---------------------------------------------------------------
class GameStatusMut extends Mutator;

function string GetServerStatus()
{
	local KFGameReplicationInfo KFGRI;
	
	KFGRI = KFGameReplicationInfo(Level.Game.GameReplicationInfo);
	
	if( KFGRI.bMatchHasBegun )
	{
		if( KFGRI.bWaveInProgress )
		{
			return "WAVE ["$KFGameReplicationInfo(Level.Game.GameReplicationInfo).WaveNumber+1$"/"$KFGameReplicationInfo(Level.Game.GameReplicationInfo).FinalWave$"]";
		}
		else
		{
			return "SHOP TIME ["$KFGameReplicationInfo(Level.Game.GameReplicationInfo).WaveNumber+1$"/"$KFGameReplicationInfo(Level.Game.GameReplicationInfo).FinalWave$"]";
		}
	}
	else
	{
		return "Game not started";
	}
}

function GetServerDetails( out GameInfo.ServerResponseLine ServerState )
{
	local int l;
	
	Super.GetServerDetails( ServerState );
	l = ServerState.ServerInfo.Length;
	ServerState.ServerInfo.Length = l+1;
	ServerState.ServerInfo[l].Key = "Game Status";
	ServerState.ServerInfo[l].Value = GetServerStatus();
	l++;
}

defaultproperties
{
	FriendlyName="Game Status Mut"
	Description="Shows current game status at Server List"
	GroupName="KF-GameStatus"
}